Skip to main content

Update Policy

Route

/v2/policies/{id}

Description

Update an existing policy with the provided configuration. The 'If-Match' header with the resource version can be optionally specified for concurrency control.

Method

PUT

Inputs

ParameterTypeRequiredDescription
idstringYesUnique identifier of the policy to update
typestringYesPolicy type (data_protection, content_inspection)
namestringYesHuman-readable name for the policy
descriptionstringNoDetailed description of the policy's purpose
severitystringYesSeverity level (informational, low, medium, high, critical)
selection_typestringYesHow datasets are selected (dataset, sensitivity)
dataset_idsarray[string]NoList of dataset IDs (when selection_type is dataset)
dataset_sensitivitiesarray[integer]NoList of sensitivity levels (when selection_type is sensitivity)
ruleobjectYesRule configuration for policy enforcement actions
exclude_originbooleanNoWhether to exclude origin location in policy evaluation
backfills_enabledbooleanNoWhether historical data backfills are enabled

Headers

HeaderTypeRequiredDescription
If-MatchstringNoResource version for concurrency control

Request Body

{
"type": "data_protection",
"name": "Updated Policy Name",
"description": "Updated policy description",
"severity": "critical",
"selection_type": "sensitivity",
"dataset_sensitivities": [3, 4, 5],
"rule": {
"status": "risky",
"create_incident": true,
"record_screenshots": false,
"inspect_content": true,
"realtime_response_config": {
"incident_action": "block"
}
},
"exclude_origin": false,
"backfills_enabled": true
}

Output

FieldTypeDescription
typestringAlways "policies"
sizeintegerNumber of policies returned (always 1)
resourcesarray[Policy]Array containing the updated policy
errorsarray[Error]Any errors encountered

Rate Limit

  • 60 requests per minute per API key
  • 5 concurrent requests per endpoint

Example Response

{
"type": "policies",
"size": 1,
"resources": [
{
"id": "policy-123",
"version": "v1.2.4",
"type": "data_protection",
"name": "Updated Policy Name",
"description": "Updated policy description",
"severity": "critical",
"disabled": false,
"selection_type": "sensitivity",
"dataset_sensitivities": [3, 4, 5],
"created_at": "2024-01-15T10:30:00Z",
"last_modified": "2024-01-25T16:45:00Z"
}
],
"errors": []
}